package com.mediacloud.app.newsmodule.javascript;

import android.content.Context;
import android.webkit.JavascriptInterface;
import android.widget.Toast;

import com.maywide.uap.api.PayApi;

/**
 * Created by Yoake on 2018/6/4.
 */

public class H5PayJavaScriptInterface {
    private Context context;

    public H5PayJavaScriptInterface(Context context) {
        this.context = context;
    }

    @JavascriptInterface
    public void alert(String msg) {
        com.utils.ToastUtil.showToastCenter(context, msg, Toast.LENGTH_LONG);
    }

    @JavascriptInterface
    public void openUrl(String url) {
        PayApi.openUrl(context, url);
    }
}